import Request from '../../common/request'

/* 登录请求 */
function Login(code, userRes) {
  return Request('Xcx/Wanted/login', 'POST', {
    code: code,
    jsonData: JSON.stringify(userRes)
  })
}
// 获取全局配置
const globalData = obj => Request('Xcx/Wanted/globalData', 'GET', obj)

//服务端openid获取用户信息
const zzpLogin = obj => Request('api/login/get_openid', 'GET', obj)

//获取union_id
const getUnionId = obj => Request('api/login/get_unionid', 'GET', obj)
const getToken = obj => Request('app/token/createZzpToken', 'GET', obj)




export default {
  globalData,
  zzpLogin,
  getUnionId,
  getToken
}
